﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICWB
    {

        [OperationContract]
        CWBInfo CWB_GetInfo(int CWBID);

        [OperationContract]
        DataSet CWB_GetList(out int ItemCount, int CandidateID, int currentPage, int pageSize);

        [OperationContract]
        int CWB_Insert(CWBInfo eInfo);

        [OperationContract]
        bool CWB_Update(CWBInfo eInfo);

        [OperationContract]
        bool CWB_Delete(int CWBID);

        [OperationContract]
        bool CWB_Exist(int CWBID, int CandidateID, string CWBNo);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class CWBInfo
    {
        
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        [DataMember]
        public int CandidateID
        {
            get { return _CandidateID; }
            set { _CandidateID = value; }
        }
        [DataMember]
        public string CompanyName
        {
            get { return _CompanyName; }
            set { _CompanyName = value; }
        }
        [DataMember]
        public string Position
        {
            get { return _Position; }
            set { _Position = value; }
        }
        [DataMember]
        public DateTime StartDate
        {
            get { return _StartDate; }
            set { _StartDate = value; }
        }
        [DataMember]
        public DateTime EndDate
        {
            get { return _EndDate; }
            set { _EndDate = value; }
        }
        [DataMember]
        public string City
        {
            get { return _City; }
            set { _City = value; }
        }

        #region VARIABLES

        int _ID;
        int _CandidateID;
        string _CompanyName;
        string _Position;
        DateTime _StartDate;
        DateTime _EndDate;
        string _City;

        #endregion
    }

}
